<!DOCTYPE html>
<html lang="@DotnetFoundationWeb.AppSettings.Lang">
<head>
    @Html.Partial("_partials/_head")

    @RenderSection("head", required: false)
    @if (Model.GetBool("UseFunctionsJS"))
    {
        <script src="js/functions.js"></script>
    }
</head>
<body class="d-flex flex-column">
    @Html.Partial("_partials/_header")

    <main id="site_wrapper" class="container-fluid cs-container flex-fill">
        <div id="site_container" class="order-3">
            <section class="body-section">
                <div class="body-container">
                    @if (Model.GetBool("IsHome") && DotnetFoundationWeb.AppSettings.IsCampaignOpen)
                    {
                        @Html.Partial("_partials/_elections-banner")
                    }

                    @if (Model.GetBool("IsHome") && DotnetFoundationWeb.AppSettings.ShowCampaignResults)
                    {
                        @Html.Partial("_partials/_elections-results-banner")
                    }

                    @RenderBody()
                </div>
            </section>
        </div>
    </main>

    <!-- Footer -->
    @Html.Partial("_partials/_footer")
    <!-- Footer End -->

    @if (Model.GetBool("IsHome"))
    {
        <script src="js/home.js"></script>
    }

    @if (Model.GetBool("IsVirtualUserGroup"))
    {
        <script src="js/virtualusergroup.js"></script>
    }

    @if (Model.GetBool("IsCommunityHome"))
    {
        <script src="js/community.js"></script>
    }


    <script src="https://cdn.jsdelivr.net/npm/js-cookie@2/src/js.cookie.min.js" crossorigin="anonymous" data-no-mirror=data-no-mirror></script>
    <script type="text/javascript" src="/js/cookie-consent.3.0.0.js"></script>
    <script type="text/javascript">
        document.addEventListener('DOMContentLoaded', function () {
            cookieconsent.run({ "notice_banner_type": "simple", "consent_type": "express", "palette": "dark", "language": "en", "website_name": ".NET Foundation", "cookies_policy_url": "https://dotnetfoundation.org/about/privacy-policy", "change_preferences_selector": "#changeCookie" });
        });
    </script>

    <script src="js/counter.js"></script>

    @if (!string.IsNullOrEmpty(DotnetFoundationWeb.AppSettings.GoogleAnalytics))
    {
        <!-- GoogleAnalytics -->
        <script type="text/plain" cookie-consent="tracking" async src="https://www.googletagmanager.com/gtag/js?id=@DotnetFoundationWeb.AppSettings.GoogleAnalytics" crossorigin="anonymous" data-no-mirror=data-no-mirror>
        </script>
        <script type="text/plain" cookie-consent="tracking">
            window.dataLayer = window.dataLayer || [];
            function gtag(){dataLayer.push(arguments);}
            gtag('js', new Date());
            gtag('config', '@DotnetFoundationWeb.AppSettings.GoogleAnalytics');
        </script>
        <!-- end of GoogleAnalytics-->
    }
</body>
</html>
